package com.deyuanyun.pic.web.timedtask;

import com.deyuanyun.pic.common.spring.SpringAppliction;
import com.deyuanyun.pic.common.util.ConvertUtil;

import java.util.List;

/**
 * Created by xu on 2016/1/26.
 * 定时任务配置获取
 */
public class TaskConfigUtil {
    static TaskConfigBean taskConfigBean= SpringAppliction.getBean(TaskConfigBean.class);
    /**
     * 获取要转换的table列表
     * @return
     */
    public static List<TaskTableInfo> getTableList(){
        return taskConfigBean.taskTableInfoList();
    }

    public static boolean isTaskServer(){
        String is=taskConfigBean.isTaskServer();
        return ConvertUtil.coverToBool(is);
    }

    public static List<String> getTaskList(){
        return taskConfigBean.getTaskListList();
    }
}
